<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>更改标题01</title>
<meta name="keywords" content="''">
<meta name="description" content="'">
<meta name="format-detection" content="telephone=no"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="msapplication-tap-highlight" content="no"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<script>
var WWW_URL = 'http://www.cjwsc.com';//每次切换环境必须修改改地址
</script>
<link rel="stylesheet" href="../../css/model.css">
<script src="../../js/jquery-1.8.3.min.js"></script>
<script src="../../js/login.js"></script>
<script src="../../js/model.js"></script>
<style>
body{font-family:'微软雅黑';}
.qcwd_main{/*border*/background:black ;}
img{width: 100%;}
img{vertical-align:top;}
.text-ellipsis-1{overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp:1; padding:0 0px; }
.text-ellipsis-2{overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp:2; padding:0 0px; }
.text-ellipsis-3{overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp:3; padding:0 0px; }
/*字体大小*/
.font-xl{font-size: 2.2em;}.font-l{font-size:1.9em;}.font-m{font-size:1.55em;}.font-s{font-size:1.45em;}.font-xs{font-size:1em;}.font-mini{font-size: 0.8em;}
/*字体大小*/
/*边距区域*/
.mt-8{margin-top:8px;} .mt-12{margin-top:12px;} .mt-14{margin-top:14px;} .mt-16{margin-top:16px;} .mt-18{margin-top:18px;} .mt-20{margin-top:20px;} .mt-25{margin-top:25px;} .mt-30{margin-top:30px;} .mt-35{margin-top:35px;}
.mb-8{margin-bottom:8px;} .mb-12{margin-bottom:12px;} .mb-14{margin-bottom:14px;} .mb-16{margin-bottom:16px;} .mb-18{margin-bottom:18px;} .mb-20{margin-bottom:20px;} .mb-25{margin-bottom:25px;} .mb-30{margin-bottom:30px;} .mb-35{margin-bottom:35px;}
/*边距区域*/

.text-c{text-align: center;}
.cl:after,.clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}.cl,.clearfix{zoom:1}

/*返回顶部*/
.back-top{position: relative;margin-top: 15px;}
.back-top:after{content:'';position:absolute; width: 50%; height: 50%; left: 50%; top:50%; -webkit-transform: translate(-50%,-50%); -moz-transform: translate(-50%,-50%); -ms-transform: translate(-50%,-50%); -o-transform: translate(-50%,-50%); transform: translate(-50%,-50%); border:1px solid red; cursor:pointer;}
/*返回顶部*/


.banner-template{height:450px;line-height: 450px;font-size: 48px;background: #e3e3e3;}


.col-25{width:25%; box-sizing: border-box; float: left; border:0px solid green; padding:0.6%; cursor: pointer; }
.col-33{width:33.33%; box-sizing: border-box; float: left; border:0px solid green; padding:0.6%; cursor: pointer; }
.col-50{width:50%; box-sizing: border-box; float: left; border:0px dashed white; padding:0 0.6%; cursor: pointer; }
.col-100{width:100%;box-sizing: border-box;padding:0 0.6%;}


.col-50 .goods-imgbox{height:380px;}
.col-33 .goods-imgbox{height:245px;}

.goods-list{position:relative;}
.goods-imgbox{border-bottom: 0px solid blue;overflow:hidden;position:relative;background: white;}
.goods-imgbox .abso-icon{width:15%;position:absolute;left:4%;top:0;}
.goods-list .descript{color:#f4c47a;font-size: 22px;}
.goods-info{border:0px solid pink;box-sizing: border-box;padding:2.5% 2.8%;position:relative;background: #3f2d13;}
.goods-list .new-price{color:white;font-size: 42px;}
.goods-list .old-price{color:#77603e;font-size: 16px;text-decoration: line-through;}
.price{position:relative;margin-top: 2.5%;}
.old-price{position:absolute;left:0;top:0;}
.new-price small{font-size:21px;color:#f4c47a;}
.new-price i{font-style: normal;font-size: 24px;color:white;}
.goods-info span.buy-btn {background: #a97e42; display: inline-block; border-radius: 16px; padding: 2px 18px; color: #3f2d13; font-size:18px; position: absolute; right: 18%; bottom: 15%;}
.goods-info p.buy-btn {width: 100%; background: #a97e42; margin: 12px auto; text-align: center; border-radius: 16px; color: #3f2d13; font-size: 18px; padding: 1px 0; box-sizing: border-box; }
.col-50 .descript{height:30px;}
.col-33 .descript{font-size:18px;height:48px;}
.col-33 .new-price{font-size:32px;}
.col-33 .old-price{top:-10px;font-size: 13px;}
.col-33 .price {position: relative;margin-top: 5.5%;}
/*商品*/
</style>
</head>
<body>
<div class="qcwd_main">
    <!--banner-->
    <div class="banner-box">
        <div class="banner pos-r">
            <div class="banner-template text-c">
              我是banner 做做样子
            </div>     
        </div>
    </div>
    <!--banner-->
    <div class="content">
      <ul class="goods-box cl">
            <li class=" goods-list col-33">
              <a class="inl-blo-full alnk C_J_good">
                <div class="goods-imgbox">
                  <img class="goods-img" src="../images/guohuojie0701/pc/ico_cjwscx.jpg" alt="">
                  <img class="abso-icon" src="../images/17818/public/jd-icon.png" alt="" >
                </div>
                <div class="goods-info">
                  <p class="descript text-ellipsis-1">厂家网818活动！！</p>
                  <p class="price">
                    <span class="new-price"><small>秒杀价:<i>￥</i></small>????</span>
                    <span class="old-price">原价:￥????</span>
                  </p>
                  <p class="buy-btn">立即抢购</p>
                </div>
              </a>
            </li>
            <li class=" goods-list col-33">
              <a class="inl-blo-full alnk C_J_good">
                <div class="goods-imgbox">
                  <img class="goods-img" src="../images/guohuojie0701/pc/ico_cjwscx.jpg" alt="">
                  <img class="abso-icon" src="../images/17818/public/jd-icon.png" alt="" >
                </div>
                <div class="goods-info">
                  <p class="descript text-ellipsis-1">厂家网818活动！！</p>
                  <p class="price">
                    <span class="new-price"><small>秒杀价:<i>￥</i></small>????</span>
                    <span class="old-price">原价:￥????</span>
                  </p>
                  <p class="buy-btn">立即抢购</p>
                </div>
              </a>
            </li>
            <li class=" goods-list col-33">
              <a class="inl-blo-full alnk C_J_good">
                <div class="goods-imgbox">
                  <img class="goods-img" src="../images/guohuojie0701/pc/ico_cjwscx.jpg" alt="">
                  <img class="abso-icon" src="../images/17818/public/jd-icon.png" alt="" >
                </div>
                <div class="goods-info">
                  <p class="descript text-ellipsis-1">厂家网818活动！！</p>
                  <p class="price">
                    <span class="new-price"><small>秒杀价:<i>￥</i></small>????</span>
                    <span class="old-price">原价:￥????</span>
                  </p>
                  <p class="buy-btn">立即抢购</p>
                </div>
              </a>
            </li>
      </ul>
      <ul class="goods-box cl">
            <li class=" goods-list col-50">
              <a class="inl-blo-full alnk C_J_good">
                <div class="goods-imgbox">
                  <img class="goods-img" src="../images/guohuojie0701/pc/ico_cjwscx.jpg" alt="">
                  <img class="abso-icon" src="../images/17818/public/jd-icon.png" alt="" >
                </div>
                <div class="goods-info">
                  <p class="descript text-ellipsis-1">厂家网818活动！！</p>
                  <p class="price">
                    <span class="new-price"><small>秒杀价:<i>￥</i></small>????</span>
                    <span class="old-price">原价:￥????</span>
                  </p>
                  <p class="buy-btn">立即抢购</p>
                </div>
              </a>
            </li>
            <li class=" goods-list col-50">
              <a class="inl-blo-full alnk C_J_good">
                <div class="goods-imgbox">
                  <img class="goods-img" src="../images/guohuojie0701/pc/ico_cjwscx.jpg" alt="">
                  <img class="abso-icon" src="../images/17818/public/jd-icon.png" alt="" >
                </div>
                <div class="goods-info">
                  <p class="descript text-ellipsis-1">厂家网818活动！！</p>
                  <p class="price">
                    <span class="new-price"><small>秒杀价:<i>￥</i></small>????</span>
                    <span class="old-price">原价:￥????</span>
                  </p>
                  <p class="buy-btn">立即抢购</p>
                </div>
              </a>
            </li>
      </ul>
    </div>
    <!-- 主体内容 end-->
    <div class="back-top">
      <img src="../images/17818/public/back-top.png" alt="">
    </div>
    
</div>
<script>
function scrollTop(obj){
    $(document).on('click',obj,function(){
      $('html,body').animate({scrollTop:0+'px'},300);
    });
}
scrollTop(".back-top");

var href = new Array(
[136458],
[138831],
[96711],
[106890],
[140549],
[140646],
[137550],
[109302],
[124007],
[139258],
[114023],
[95439],
[124901],
[135919],
[124236],
[123863],
[119633],
[133795],
[140405],
[112166],
[137059],
[139388]
);
$(document.body).find('.C_J_good').each(function(_index){
  $(this).attr('data-id',href[_index]);
})
$(function() {
  var url = WWW_URL + '/qcwdProduct/getProductByIds?ids=';
  var type = '&business_type=50&client_type=5';
  $.ajax({
      url: url + href.join(",") + type,
      dataType: "jsonp",
      jsonp: "jsonpcallback",
      success: function(data) {
          if (data.error == false) {
              var productData = data.msg;
              var dataLength = productData.length;
              for (var i = 0; i < dataLength; i++) {
                  var productName = productData[i]['name'];
                  var id = productData[i]['id']
                  var price = productData[i]['price'];
                  var discountPrice = productData[i]['discountPrice'];
                  var pic = productData[i]['pic'];
                  var pic_c = pic.replace('240_240','800_800');
                  var isfree = productData[i]['isfree'];
                  var isdouble = productData[i]['isdouble'];
                  var isavctive_full = productData[i]['isavctive_full'];
                  var discount = productData[i]['discount'];
                  var stock_num = productData[i]['stock_num'];
                  var freeFlag = productData[i]['freeFlag'];
                  var price_on_tag=productData[i]['price_on_tag'];
                  var discountStartTime=productData[i]['discountStartTime'];
                  var discountEndTime=productData[i]['discountEndTime'];
                        var d = new Date();
                        var n = Math.round(d.getTime()/1000);
                        if(discountStartTime!=0 && discountEndTime!=0){
                            if(discountStartTime<n && n<discountEndTime){
                                price = discountPrice;
                            }
                            else{
                                price = price;
                            }
                        }
                        else{
                             price=price;
                        }
                  var showfreeClass = '';
                  if (isfree == '') {
                      showfreeClass = 'displayNone';
                  }
                  var errorimage = "public.cjwsc.com/images/product_loading.gif";
                  //新价格  
                  $('.C_J_good[data-id="' + id + '"]').find(".price .old-price").html('原价:￥'+price_on_tag);
                  $('.C_J_good[data-id="' + id + '"]').find(".descript").html(productName);
                  $('.C_J_good[data-id="' + id + '"]').find(".price .new-price").html('<small>秒杀价:<i>￥</i></small>'+price);
                  $('.C_J_good[data-id="' + id + '"]').find(".goods-imgbox .goods-img").attr('src',pic_c);
                  if (stock_num<=0||status==2) {
                      $('.C_J_good[data-id="' + id + '"]').addClass("col_sx").removeClass("C_J_good");
                  }
              }
          } else {
              console.log('error');
          }
      }
  });
});
</script>
<script src="../../js/model-citizen.js"></script>
</body>
</html>


